*%% 
*%% Common definitions for HP DeskJet 99x Series printers 
*%%
*%% Copyright 1999, Hewlett-Packard Co.
*%% All Rights Reserved.
*%%

*Include: "hpfnam50.gpd"


*%%
*%% Global Entries
*%%
*ResourceDLL: "hpfui50.dll"


*rcPersonalityID: =PERSONALITY_PCL_DISPLAY 

*MasterUnits: PAIR(1200, 1200)

*switch:  Duplex
{
    *case: NONE
    { 
        *OutputOrderReversed?: TRUE
    }
    *default:
    { 
        *OutputOrderReversed?: FALSE
    }
}

*PrinterType: SERIAL

*%%
*%% Macros
*%%
*%% collection of the macros common to all modes for this product
*%%
*Macros: OEMCommonCombinations
{
    OEM_COMMON_INFO: =OEM_PCLA =OEM_PCL_MARG_0 =OEM_PCL_MARG_DUP
}


*Feature: PSHelpFile
{
    *Name: "PSHelp"
    *Option: HPFDJ200
    {
        *Name: ""
    }
}


*%
*% If Duplex is selected and installed 
*% this will send us even pages backwards
*%
*ReverseBandOrderForEvenPages?: TRUE

*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.50
            *Cmd: =PCL_ORIENT_PORTRAIT
        }
    }
    *Option: LANDSCAPE_CC270
    {
        *rcNameID: =LANDSCAPE_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.50
            *Cmd: =PCL_ORIENT_PORTRAIT
        }
    }
}


*Feature: Duplex
{   
    *rcNameID: =TWO_SIDED_PRINTING_DISPLAY
    *DefaultOption: NONE

    *Option: NONE
    {
        *rcNameID: =NONE_DISPLAY
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.20
            *Cmd: "<1B>&l0S"
        }
    }
    *Option: VERTICAL
    {
        *rcNameID: =FLIP_ON_LONG_EDGE_DISPLAY
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.20
            *Cmd: "<1B>&l2S"
        }

        *Constraints: HPDuplexUnit.NotInstalled
    }
    *Option: HORIZONTAL
    {
        *rcNameID: =FLIP_ON_SHORT_EDGE_DISPLAY
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.20
            *Cmd: "<1B>&l2S"
        }
        *Constraints: HPDuplexUnit.NotInstalled
    }
}


*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
    *DefaultOption: UPPER
    *Option: UPPER
    {
        *rcNameID: =UPPER_TRAY_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.40
            *Cmd: =PCL_MEDSOURCE_TRAY1 =PCL_MEDSOURCE_PRELOAD
        }
    }
    *Option: MANUAL
    {
        *rcNameID: =MANUAL_FEED_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.40
            *Cmd: =PCL_MEDSOURCE_MANUALFEED
        }
    }
    *Option: ENVMANUAL
    {
        *rcNameID: =ENV_MANUAL_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.40
            *Cmd: =PCL_MEDSOURCE_ENVMANFEED
        }
    }
}


*BlockMacro:  DUPLEX_CONSTRAINT
{
    *Constraints: LIST(Duplex.VERTICAL, Duplex.HORIZONTAL)
}


*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: LETTER
    *Option: LETTER
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_US_LETTER
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(9600, 12500)
                        *PrintableOrigin: PAIR(300, 80)
                        *CursorOrigin: PAIR(300, 80)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(9600, 12096)
                        *PrintableOrigin: PAIR(300, 552)
                        *CursorOrigin: PAIR(300, 552)
                    }
                }
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(9600, 12500)
                        *PrintableOrigin: PAIR(300, 80)
                        *CursorOrigin: PAIR(9900, 80)				
                    }
                    *default
                    {
                        *PrintableArea: PAIR(9600, 12096)
                        *PrintableOrigin: PAIR(300, 552)
                        *CursorOrigin: PAIR(9900, 552)				
                    }
                }
            }
        }
    }
    *Option: LEGAL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_US_LEGAL
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(9600, 16104)
                *PrintableOrigin: PAIR(300, 96)
                *CursorOrigin: PAIR(300, 96)
            }
            *case: LANDSCAPE_CC270
            {
                *PrintableArea: PAIR(9600, 16104)
                *PrintableOrigin: PAIR(300, 96)
                *CursorOrigin: PAIR(9900, 96)
            }
        }
        *InsertBlock: =DUPLEX_CONSTRAINT
    }
    *Option: EXECUTIVE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_US_EXECUTIVE
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(8096, 11824)
                        *PrintableOrigin: PAIR(300, 48)
                        *CursorOrigin: PAIR(300, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(8096, 11560)
                        *PrintableOrigin: PAIR(302, 520)
                        *CursorOrigin: PAIR(302, 520)
                    }
                }                
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(8096, 11824)
                        *PrintableOrigin: PAIR(300, 48)
                        *CursorOrigin: PAIR(8396, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(8096, 11560)
                        *PrintableOrigin: PAIR(266, 520)
                        *CursorOrigin: PAIR(8398, 520)
                    }
                }
            }
        }
    }
    *Option: A4
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_A4
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(9600, 13360)
                        *PrintableOrigin: PAIR(160, 80)
                        *CursorOrigin: PAIR(160, 80)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(9600, 12928)
                        *PrintableOrigin: PAIR(160, 512)
                        *CursorOrigin: PAIR(160, 512)
                    }
                }  
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(9600, 13360)
                        *PrintableOrigin: PAIR(160, 80)
                        *CursorOrigin: PAIR(9760, 80)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(9600, 12928)
                        *PrintableOrigin: PAIR(160, 512)
                        *CursorOrigin: PAIR(9760, 512)
                    }
                }
            }
        }
    }    
    *Option: A5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_A5
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(6688, 9144)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(152, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(6688, 8884)
                        *PrintableOrigin: PAIR(152, 520)
                        *CursorOrigin: PAIR(152, 520)
                    }
                }                
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(6688, 9144)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(6840, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(6688, 8884)
                        *PrintableOrigin: PAIR(152, 520)
                        *CursorOrigin: PAIR(6840, 520)
                    }
                }
            }
        }
    }
    *Option: A6
    {
        *rcNameID: =A6_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_A6
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4656, 6228)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(152, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4656, 5796)
                        *PrintableOrigin: PAIR(152, 600)
                        *CursorOrigin: PAIR(152, 600)
                    }
                }
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4656, 6228)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(4808, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4656, 5796)
                        *PrintableOrigin: PAIR(152, 600)
                        *CursorOrigin: PAIR(4808, 600)
                    }
                }
            }
        }
    } 
    *Option: B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_B5
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(8272,11372)
                        *PrintableOrigin: PAIR(160,48)
                        *CursorOrigin: PAIR(160, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(8100, 10944)
                        *PrintableOrigin: PAIR(160, 600)
                        *CursorOrigin: PAIR(160, 600)
                    }
                }  
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(8272,11372)
                        *PrintableOrigin: PAIR(160, 48)
                        *CursorOrigin: PAIR(8432, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(8100,10944)
                        *PrintableOrigin: PAIR(160, 600)
                        *CursorOrigin: PAIR(8384, 600)
                    }
                }
            }
        }
    } 
    *Option: ENV_10
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_ENV_10
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4640,  10632)
                *PrintableOrigin: PAIR(152, 48)
                *CursorOrigin: PAIR(152, 48)
            }
            *case: LANDSCAPE_CC270
            {
                *PrintableArea: PAIR(4640,  10632)
                *PrintableOrigin: PAIR(152, 48)
                *CursorOrigin: PAIR(4792, 48)
            }
        }
        *InsertBlock: =DUPLEX_CONSTRAINT    
    }
    *Option: ENV_DL
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_ENV_DL
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4880, 9624)
                *PrintableOrigin: PAIR(152, 48)
                *CursorOrigin: PAIR(152, 48)
            }
            *case: LANDSCAPE_CC270
            {
                *PrintableArea: PAIR(4880, 9624)
                *PrintableOrigin: PAIR(152, 48)
                *CursorOrigin: PAIR(5032, 48)
            }
        }
        *InsertBlock: =DUPLEX_CONSTRAINT    
    }
    *Option: ENV_C6
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_ENV_C6
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(5056, 6884)
                *PrintableOrigin: PAIR(160, 48)
                *CursorOrigin: PAIR(160, 48)
            }
            *case: LANDSCAPE_CC270
            {
                *PrintableArea: PAIR(5056, 6884)
                *PrintableOrigin: PAIR(160, 48)
                *CursorOrigin: PAIR(5216, 48)
            }
        }
        *InsertBlock: =DUPLEX_CONSTRAINT
    }
    *Option: ENV_A2
    {
        *rcNameID: =ENV_A2_DISPLAY
        *PageDimensions: PAIR(5232, 6900)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_ENV_A2
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *PrintableArea: PAIR(4912, 6252)
                *PrintableOrigin: PAIR(160, 48)
                *CursorOrigin: PAIR(160, 48)
            }
            *case: LANDSCAPE_CC270
            {
                *PrintableArea: PAIR(4912, 6252)
                *PrintableOrigin: PAIR(160, 48)
                *CursorOrigin: PAIR(5072, 48)
            }
        }
        *InsertBlock: =DUPLEX_CONSTRAINT
    }
    *Option: JAPANESE_POSTCARD
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_JAPANESE_POSTCARD
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4416, 6228)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(152, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4400, 5956)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(160, 520)
                    }
                }
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4416, 6228)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(4568, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4400, 5956)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(4574, 520)
                    }
                }
            }
        }
    }
    *Option: INDEX_4x6
    {
        *rcNameID: =US_INDEX_CARD_4X6_DISPLAY
        *PageDimensions: PAIR(4800, 7200)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_INDEX_4x6
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4480, 6432)
                        *PrintableOrigin: PAIR(160, 48)
                        *CursorOrigin: PAIR(160, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4480, 6160)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(160, 520)
                    }
                }  
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(4480, 6432)
                        *PrintableOrigin: PAIR(160, 48)
                        *CursorOrigin: PAIR(4640, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(4480, 6160)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(4640, 520)
                   }
                }
            }
        }
    }
    *Option: INDEX_5x8
    {
        *rcNameID: =US_INDEX_CARD_5X8_DISPLAY
        *PageDimensions: PAIR(6000, 9600)
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_INDEX_5x8
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(5696, 8832)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(152, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(5700, 8560)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(160, 520)
                    }
                } 
            }
            *case: LANDSCAPE_CC270
            {
                *switch: Duplex
                {
                    *case: NONE
                    {
                        *PrintableArea: PAIR(5696, 8832)
                        *PrintableOrigin: PAIR(152, 48)
                        *CursorOrigin: PAIR(5848, 48)
                    }
                    *default
                    {
                        *PrintableArea: PAIR(5700, 8560)
                        *PrintableOrigin: PAIR(160, 520)
                        *CursorOrigin: PAIR(5850, 520)
                    }
                } 
            }
        }
    }
    *Option: CUSTOMSIZE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *MinSize: PAIR(4124, 6356)
        *MaxSize: PAIR(9600, 16164)
        *MaxPrintableWidth: 1
        *MinLeftMargin: 150
        *CenterPrintable?: FALSE
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.30
            *Cmd: =PCL_US_LEGAL
        }
        *switch: Orientation
        {
            *case: PORTRAIT
            {
                *CustCursorOriginX:    %d{200}
                *CustCursorOriginY:    %d{100}
                *CustPrintableOriginX: %d{200}
                *CustPrintableOriginY: %d{100}
                *CustPrintableSizeX:   %d{PhysPaperWidth - 400}
                *CustPrintableSizeY:   %d{PhysPaperLength - 700}
            }
            *case: LANDSCAPE_CC270
            {
                *CustCursorOriginX:    %d{PhysPaperWidth - 200}
                *CustCursorOriginY:    %d{100}
                *CustPrintableOriginX: %d{200}
                *CustPrintableOriginY: %d{100}
                *CustPrintableSizeX:   %d{PhysPaperWidth - 400}
                *CustPrintableSizeY:   %d{PhysPaperLength - 700}
            }
        }
    	*InsertBlock: =DUPLEX_CONSTRAINT    
    }
}


*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *ConflictPriority: 50
    *UpdateQualityMacro?: TRUE

    *DefaultOption: r300x300
    *Option: r300x300
    {
        *Name: "300 x 300 " =DOTS_PER_INCH
        *DPI: PAIR(300, 300)
        *TextDPI: PAIR(300, 300)
        *SpotDiameter: 100
    }
    *Option: r600x600
    {
        *Name: "600 x 600 " =DOTS_PER_INCH
        *DPI: PAIR(600, 600)
        *TextDPI: PAIR(600, 600)
        *SpotDiameter: 100
    }
    *Option: r1200x1200
    {
        *Name: "1200 x 1200 " =DOTS_PER_INCH
        *DPI: PAIR(1200, 1200)
        *TextDPI: PAIR(1200, 1200)
        *SpotDiameter: 100
    }

}

*Feature: PM
{
    *rcNameID: =PRINT_MODE_DISPLAY
    *ConflictPriority: 40
    *FeatureType: DOC_PROPERTY
    *UpdateQualityMacro?: TRUE

    *DefaultOption: PlainNormalColor
    *Option: PlainEconoMono
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_300LETTER =HPA_CRD_SEQC33
        }
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC332
        *Constraints: ColorMode.Color24
        *Constraints: LIST(PQ.Normal, PQ.Best)
        *Constraints: LIST(Resolution.r600x600,Resolution.r1200x1200)
    }
    *Option: PlainNormalMono
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_300LETTER =HPA_CRD_SEQC33
        }
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC332
        *Constraints: ColorMode.Color24
        *Constraints: LIST(PQ.Econo, PQ.Best)
        *Constraints: LIST(Resolution.r600x600,Resolution.r1200x1200)
    }
    *Option: PlainBestMono
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_600LETTER =HPA_CRD_SEQC66
        }       
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC662
        *Constraints: ColorMode.Color24
        *Constraints: LIST(PQ.Econo, PQ.Normal)
        *Constraints: LIST(Resolution.r300x300,Resolution.r1200x1200)
    }
    *Option: PlainEconoColor
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_300LETTER =HPA_CRD_SEQC33
        }
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC332
        *Constraints: ColorMode.Gray8
        *Constraints: LIST(PQ.Normal, PQ.Best)
        *Constraints: LIST(Resolution.r600x600,Resolution.r1200x1200)
    }
    *Option: PlainNormalColor
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_300LETTER =HPA_CRD_SEQC33
        }
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC332
        *Constraints: ColorMode.Gray8
        *Constraints: LIST(PQ.Econo, PQ.Best)
        *Constraints: LIST(Resolution.r600x600,Resolution.r1200x1200)
    }
    *Option: PlainBestColor
    {
        *rcNameID: =AUTO_SELECT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.45
            *Cmd: =PCL_RASWIDTH_600LETTER =HPA_CRD_SEQC66
        }
        EXTERN_GLOBAL: *OEMCustomData:
+           =OEM_COMMON_INFO =OEM_DF_HPA_SEQC662
        *Constraints: ColorMode.Gray8
        *Constraints: LIST(PQ.Econo, PQ.Normal)
        *Constraints: LIST(Resolution.r300x300,Resolution.r1200x1200)
    }
}


*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *ConflictPriority: 10
    *DefaultOption: STANDARD
    *UpdateQualityMacro?: TRUE

    *Option: STANDARD
    {
        *rcNameID: =PLAIN_PAPER_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_PLAIN
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PREMIUM_INKJET_PAPER
    {   
        *rcNameID: =HP_PREMIUM_INKJET_PAPER_DISPLAY
        *OptionID: =HP_PREMIUM_INKJET_PAPER_ID
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_SPECIAL
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PREMIUM_INKJET_HEAVYWEIGHT
    {   
        *rcNameID: =HP_PREMIUM_INKJET_HEAVYWEIGHT_DISPLAY
        *OptionID: =HP_PREMIUM_INKJET_HEAVYWEIGHT_ID
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_INKJET_HEAVY
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: TRANSPARENCY
    {
        *rcNameID: =HP_PREMIUM_INKJET_TRANSPARENCY_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd:  =PCL_MEDIA_TRANSPARENCY
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PREMIUM_PHOTO_PAPER
    {   
        *rcNameID: =HP_PREMIUM_PHOTO_PAPER_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_PREMIUM_PHOTO
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PHOTO_PAPER
    {   
        *rcNameID: =HP_PHOTO_PAPER_DISPLAY
        *OptionID: =HP_PHOTO_PAPER_ID
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_GLOSSY
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PROFESSIONAL_BROCHURE_GLOSSY
    {   
        *rcNameID: =HP_PROFESSIONAL_BROCHURE_GLOSSY_DISPLAY
        *OptionID: =HP_PROFESSIONAL_BROCHURE_GLOSSY_ID
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_BROCHURE_GLOSSY
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }

    *Option: HP_PROFESSIONAL_BROCHURE_MATTE
    {   
        *rcNameID: =HP_PROFESSIONAL_BROCHURE_MATTE_DISPLAY
        *OptionID: =HP_PROFESSIONAL_BROCHURE_MATTE_ID
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.10
            *Cmd: =PCL_MEDIA_BROCHURE_MATTE
        }
        EXTERN_GLOBAL: *ChangeColorModeOnDoc?: FALSE
    }
}

*Feature: ColorMode
{
    *rcNameID: =COLOR_PRINTING_MODE_DISPLAY
    *ConflictPriority: 30
    *UpdateQualityMacro?: TRUE
    *DefaultOption: Color24

    *Option: Gray8
    {   
        *rcNameID: =GRAYSCALE_DISPLAY
        *Color?: FALSE
        *DevNumOfPlanes: 0
        *DevBPP: 0
        *DrvBPP: 8
        *IPCallbackID: 1
        *Command: CmdSendBlockData { *Cmd: "" }
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.10
            *Cmd: =PJL_ENTER_PCL3GUI
        }
    }
    *Option: Color24
    {   
        *rcNameID: =24BPP_DISPLAY
        *Color?: TRUE
        *DevNumOfPlanes: 0
        *DevBPP: 0
        *DrvBPP: 24
        *IPCallbackID: 1
        *Command: CmdSendBlockData { *Cmd: "" }
        *Command: CmdSelect
        {
            *Order: JOB_SETUP.10
            *Cmd: =PJL_ENTER_PCL3GUI
        }
    }
}

*Feature: PQ
{
    *rcNameID: =PRINT_QUALITY_DISPLAY
    *ConflictPriority: 20
    *FeatureType: DOC_PROPERTY
    *UpdateQualityMacro?: TRUE

    *DefaultOption: Normal
    *Option: Econo
    {
        *rcNameID: =DRAFT_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.20
            *Cmd: =PCL_PQ_ECONO
        }
    }
    *Option: Normal
    {
        *rcNameID: =NORMAL_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.20
            *Cmd: =PCL_PQ_NORMAL
        }
    }
    *Option: Best
    {
        *rcNameID: =BEST_DISPLAY
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.20
            *Cmd: =PCL_PQ_BEST
        }
    }
}


*%%
*%% Print Quality Macros
*%%
*switch: MediaType
{
    *case: STANDARD
    {
        *switch: ColorMode
        {
            *case: Gray8
            {
                *DraftQualitySettings:  LIST(ColorMode.Gray8, PM.PlainEconoMono,  PQ.Econo,  Resolution.r300x300)
                *BetterQualitySettings: LIST(ColorMode.Gray8, PM.PlainNormalMono, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Gray8, PM.PlainBestMono,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BETTERQUALITY
            }
            *default:
            {
                *DraftQualitySettings:  LIST(ColorMode.Color24, PM.PlainEconoColor,  PQ.Econo,  Resolution.r300x300)
                *BetterQualitySettings: LIST(ColorMode.Color24, PM.PlainNormalColor, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Color24, PM.PlainBestColor,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BETTERQUALITY
            }
        }
    }

    *case: TRANSPARENCY
    {
        *switch: ColorMode
        {
            *case: Gray8
            {
                *DraftQualitySettings:  LIST(ColorMode.Gray8, PM.PlainEconoMono,  PQ.Econo,  Resolution.r300x300)
                *BetterQualitySettings: LIST(ColorMode.Gray8, PM.PlainNormalMono, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Gray8, PM.PlainBestMono,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BETTERQUALITY
            }
            *default:
            {
                *DraftQualitySettings:  LIST(ColorMode.Color24, PM.PlainEconoColor,  PQ.Econo,  Resolution.r300x300)
                *BetterQualitySettings: LIST(ColorMode.Color24, PM.PlainNormalColor, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Color24, PM.PlainBestColor,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BETTERQUALITY
            }
        }
    }

    *default:
    {
        *switch: ColorMode
        {
            *case: Gray8
            {
                *DraftQualitySettings:  LIST()
                *BetterQualitySettings: LIST(ColorMode.Gray8, PM.PlainNormalMono, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Gray8, PM.PlainBestMono,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BESTQUALITY
            }
            *default:
            {
                *DraftQualitySettings:  LIST()
                *BetterQualitySettings: LIST(ColorMode.Color24, PM.PlainNormalColor, PQ.Normal, Resolution.r300x300)
                *BestQualitySettings:   LIST(ColorMode.Color24, PM.PlainBestColor,   PQ.Best,   Resolution.r600x600)
                *DefaultQuality: BESTQUALITY
            }
        }
    }
}


*%%
*%% Printer Configuration Commands
*%%
*Command: CmdStartDoc
{
    *Order: DOC_SETUP.10
    *Cmd: ""
}

*Command: CmdEndDoc
{
    *Order: DOC_FINISH.10
    *Cmd: =PJL_EXIT_LANGUAGE
}

*Command: CmdStartPage
{
    *Order: PAGE_SETUP.60
    *Cmd: "<1B>*o7W<08 09 00 00 07 00 01><1B>&u600D<1B>*r1A"
}

*Command: CmdEndPage
{
    *Order: PAGE_FINISH.10
    *Cmd: "<1B>*rC<0C>"
}


*%%
*%% Printing Attributes and Commands
*%%
*RotateCoordinate?: TRUE
*RotateRaster?: FALSE

*BadCursorMoveInGrxMode: LIST(X_PORTRAIT,Y_LANDSCAPE)
*CursorXAfterCR: AT_PRINTABLE_X_ORIGIN
*EjectPageWithFF?: FALSE
*XMoveThreshold: 0
*YMoveThreshold: 0
*XMoveUnit: 600
*YMoveUnit: 600
*Command: CmdXMoveAbsolute { *Cmd: "<1B>*p" %d{DestX}"X" }
*Command: CmdYMoveAbsolute { *Cmd: "<1B>*p" %d{DestY}"Y" }
*Command: CmdCR { *Cmd: "<0D>" }
*Command: CmdLF { *Cmd: "<0A>" }
*Command: CmdFF { *Cmd: "<0C>" }

*OutputDataFormat: H_BYTE
*CursorXAfterSendBlockData: AT_GRXDATA_ORIGIN
*CursorYAfterSendBlockData: AUTO_INCREMENT
*RasterSendAllData?: TRUE
